<?
    foreach ($this->companies as $model_company)
    {
        $expand = (isset($this->expand_company_id)) && ($this->expand_company_id == $model_company->getID());
?>
<li class="has_content">
    <div class="node_pict <?=($expand ? " opened" : "closed")?>" id="company_<?=$model_company->getID(); ?>" onClick="expandMenu({controller: 'viewbycompany', company_id: <?=($model_company->getID()) ?>, level: EXPAND_VIEW_BY_COMPANY_IN_COMPANY})"></div>
    <a href="" onClick="ajaxViewByCompany({id: <?=$model_company->getID(); ?>, action: 'edit', container: 'inner', no_apply: true}); return false;"><? if ($model_company->isPool()) echo "[@]"; ?><nobr><?=$model_company->getCaption(); ?></nobr></a>
    <ul id="company_<?=$model_company->getID(); ?>_content" <? if ($expand) echo "style=\"display: block;\""; ?>>
<?
        if ($expand)
            echo $this->expand;
?>
    </ul>
</li>
<?
    };
?>
<li class="add_item">
    <a href="" onClick="addItem({menu: 'viewbycompany', container: 'inner'<? if (isset($this->pool_id)) echo ", pool_id: ".$this->pool_id ?>}); return false;">Add new company</a>
</li>